package com.packt.webdriver.chapter1;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class GoogleSearchByCSSSelector2 {
	public static void main(String[] args) {
		WebDriver driver = new FirefoxDriver();
		driver.get("http://www.google.com");
		WebElement searchButton = driver.findElement(By
				.cssSelector("html body#gsr.hp div#viewport.ctr-p div#mngb div#gb.gb_jc div.gb_Hb div.gb_e div#gbq div#gbq2.gbt div#gbqfw form#gbqf.gb_Ub div#gbqfbwa.jsb button#gbqfba.gbqfba"));
		System.out.println(searchButton.getText());
	}
}
